package cn.elwy.rcp.ui.explorer.editor;

import org.eclipse.core.resources.IFile;
import org.eclipse.ui.part.FileEditorInput;

/**
 * @author lianxiaowei
 */
public final class PackerEditorInput extends FileEditorInput {

  private String name;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public PackerEditorInput(IFile file) {
    super(file);
  }

  public String getToolTipText() {
    return getName();
  }

  @Override
  public boolean equals(Object arg0) {
    if (null == arg0)
      return false;

    if (!(arg0 instanceof PackerEditorInput))
      return false;

    if (!getName().equals(((PackerEditorInput) arg0).getName()))
      return false;
    return true;
  }

}
